import { RestService, Rest } from '@abp/ng.core';
import { Injectable } from '@angular/core';

@Injectable({
  providedIn: 'root',
})
export class ApprovalHistoryService {
  apiName = 'Default';
  

  addHistory = (inboundManageId: string, operationType: string, result: string, comment: string, operatorName: string, config?: Partial<Rest.Config>) =>
    this.restService.request<any, void>({
      method: 'POST',
      url: `/api/app/approval-history/history/${inboundManageId}`,
      params: { operationType, result, comment, operatorName },
    },
    { apiName: this.apiName,...config });

  constructor(private restService: RestService) {}
}